/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package isd.general.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Claudio
 */
@Embeddable
public class GR_ComprobantePK implements Serializable {
    
    @Basic(optional = false)
    @Column(name = "GRCCBH_MODCOM", nullable = false, length = 2)
    private String modcom;
    @Basic(optional = false)
    @Column(name = "GRCCBH_CODCOM", nullable = false, length = 6)
    private String codcom;

    public GR_ComprobantePK() {
    }

    public GR_ComprobantePK(String modcom, String codcom) {
        this.modcom = modcom;
        this.codcom = codcom;
    }

    public String getCodcom() {
        return codcom;
    }

    public void setCodcom(String codcom) {
        this.codcom = codcom;
    }

    public String getModcom() {
        return modcom;
    }

    public void setModcom(String modcom) {
        this.modcom = modcom;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (modcom != null ? modcom.hashCode() : 0);
        hash += (codcom != null ? codcom.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GR_ComprobantePK)) {
            return false;
        }
        GR_ComprobantePK other = (GR_ComprobantePK) object;
        if ((this.modcom == null && other.modcom != null) || (this.modcom != null && !this.modcom.equals(other.modcom))) {
            return false;
        }
        if ((this.codcom == null && other.codcom != null) || (this.codcom != null && !this.codcom.equals(other.codcom))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        
        return "modcom=" + modcom + ", codcom=" + codcom ;
    }


}
